GtkCssImageIconTheme: Don't try to unref a NULL pointer
authorKjell Ahlstedt <kjellahlstedt@gmail.com>
Fri, 10 Nov 2017 15:48:30 +0000 (16:48 +0100)
committerKjell Ahlstedt <kjellahlstedt@gmail.com>
Fri, 10 Nov 2017 15:48:30 +0000 (16:48 +0100)
In gtk_css_image_icon_theme_snapshot(), don't try to unref icon_info
if it's NULL.

https://bugzilla.gnome.org/show_bug.cgi?id=790171

gtk/gtkcssimageicontheme.c

index 399f7b4f2bf9f03ec19a8831eba894124a3ef5b4..1183bd89626e33936874c3630cc775a9cdb2cc06 100644 (file)
@@ -100,7 +100,8 @@ gtk_css_image_icon_theme_snapshot (GtkCssImage *image,
       icon_theme->cached_symbolic = symbolic;
 
       g_object_unref (pixbuf);
-      g_object_unref (icon_info);
+      if (icon_info)
+        g_object_unref (icon_info);
     }
 
   texture_width = (double) gdk_texture_get_width (texture) / icon_theme->scale;